package com.daowen.util;

import net.sf.json.JSONObject;

import java.util.List;




public class DaowenUIHelper {

    public static String getJsonFromList(List beanList){
        return getJsonFromList(beanList.size(),beanList);
    }

    private static String getJsonFromList(int recordTotal, List rows) {

        JSONObject jsonobject = new JSONObject();
        jsonobject.put("Rows", rows);
        jsonobject.put("Total",new Integer(recordTotal));

        return jsonobject.toString();

    }

}
